/*
 * ViewerProtocolFactory.cpp
 *
 *  Created on: May 28, 2011
 *      Author: madboyka
 */

#include "TcpSocketViewerProtocol.h"
#include "ViewerProtocolFactory.h"
#include "QSocketViewerProtocol.h"
#include "SdlSocketViewerProtocol.h"

ViewerProtocol* ViewerProtocolFactory::create(const QString name)
{
	if (name == QString("SocketTcp"))
	{
		return new TcpSocketViewerProtocol();
	}
	if (name == QString("QSocketTcp"))
	{
		return new QSocketViewerProtocol();
	}
	if (name == QString("SdlSocketTcp"))
	{
		return new SdlSocketViewerProtocol();
	}
	return 0;
}

